@import '~antd/es/style/themes/default.less'; // 如果使用Ant Design的主题变量

.container {
  background: white; // 新增背景色
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  min-height: 390px;
  height: 100%; // 确保容器有明确的高度
  .header {
    display: flex;
    align-items: center; // 垂直居中
    justify-content: space-between; // 标题和选项卡分居两侧
    margin-bottom: 16px;
    flex-wrap: wrap; // 允许在小屏幕换行
    gap: 16px; // 元素间间距
    flex-shrink: 0; // 防止头部被压缩
  }

  .title {
    font-size: 18px;
    font-weight: 500;
    color: @heading-color;
    margin: 0; // 去除默认margin
  }

  .tabContainer {
    display: flex;
    align-items: center;
    border-bottom: 1px solid @border-color-base;
    padding-bottom: 4px;
    flex-grow: 1; // 允许容器扩展
    justify-content: flex-end; // 靠右对齐

    .tabButton {
        padding: 8px 16px;
        margin-right: 8px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 14px;
        color: @text-color-secondary;
        border-radius: 4px 4px 0 0;
        transition: all 0.2s;
  
        &:hover {
          background-color: @item-hover-bg;
          color: @text-color;
        }
  
        &.active {
          color: @primary-color;
          background-color: @primary-1;
          font-weight: 500;
        }
      }

    .moreButton {
      margin-left: 16px;
      padding: 4px 8px;
      background: none;
      border: 1px solid @border-color-base;
      border-radius: @border-radius-base;
      cursor: pointer;
      color: @text-color-secondary;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: all 0.2s;

      &:hover {
        color: @primary-color;
        border-color: @primary-color;
      }
    }
  }
  .tableContainer {
    flex: 1; // 占据剩余空间
    overflow-y: auto; // 垂直滚动
    max-height: 250px; // 或根据需要调整
  }
  .table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid @border-color-base;
    border-radius: @border-radius-base;

    th {
      position: sticky;
      top: -1px;
      background-color: @table-header-bg;
      font-weight: 500;
      text-align: left;
      padding: 12px 16px;
      border-bottom: 1px solid @border-color-split;
    }

    td {
      padding: 12px 16px;
      border-bottom: 1px solid @border-color-split;
      vertical-align: top;
    }

    tr:last-child td {
      border-bottom: none;
    }

    tr:hover {
      background-color: @table-row-hover-bg;
    }
  }

  .typeColumn {
    width: 10%;
  }

  .titleColumn {
    width: 40%;
  }
  
  .departmentColumn{
    width: 30%;
  }

  .date{
    width: 20%;
  }

  .textEllipsis {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.emptyState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 0;
  
  .emptyImage {
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
    opacity: 0.6;
  }
  
  .emptyText {
    color: rgba(0, 0, 0, 0.45);
    font-size: 16px;
  }
}

.clickableRow {
  cursor: pointer;
  transition: background-color 0.3s;

  &:hover {
    background-color: #f5f5f5;
  }
}